﻿<UserControl x:Class="SilverlightMultiTouch.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
    xmlns:behaviors="clr-namespace:MultiTouch.Behaviors.Silverlight;assembly=MultiTouch.Behaviors.Silverlight"
    xmlns:p="clr-namespace:Microsoft.SilverlightMediaFramework.Player;assembly=Microsoft.SilverlightMediaFramework.Player"
    mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="400">

    <Grid x:Name="LayoutRoot">
        <Canvas>
            <Canvas.Background>
                <LinearGradientBrush StartPoint=".2,0" EndPoint=".7,1">
                    <GradientStop Color="Black" Offset="0"/>
                    <GradientStop Color="DarkSlateGray" Offset="1"/>
                </LinearGradientBrush>
            </Canvas.Background>
            <Image Source="Images/Desert.jpg" x:Name="image1">
                <interactivity:Interaction.Behaviors>
                    <behaviors:MultiTouchManipulationBehavior InertiaEnabled="True"
                               TouchRotateEnabled="True" TouchTranslateEnabled="True" TouchScaleEnabled="True"    
                               MinimumScale="200" MaximumScale="1000" XLocation="100" YLocation="100"/>
                </interactivity:Interaction.Behaviors>
            </Image>

            <p:CoreSmoothStreamingMediaElement x:Name="video" Background="{StaticResource GlossyBlack_BackgroundGradient}"
            AutoPlay="True" SmoothStreamingSource="http://video3.smoothhd.com.edgesuite.net/ondemand/Big%20Buck%20Bunny%20Adaptive.ism/Manifest">
                <interactivity:Interaction.Behaviors>
                    <behaviors:MultiTouchManipulationBehavior InertiaEnabled="True"
                               TouchRotateEnabled="True" TouchTranslateEnabled="True" TouchScaleEnabled="True"
                               MinimumScale="300" MaximumScale="400" XLocation="200" YLocation="200"/>
                </interactivity:Interaction.Behaviors>
                
            </p:CoreSmoothStreamingMediaElement>

            <Image Source="Images/Jellyfish.jpg" x:Name="image2">
                <interactivity:Interaction.Behaviors>
                    <behaviors:MultiTouchManipulationBehavior InertiaEnabled="False"
                               TouchRotateEnabled="False" TouchTranslateEnabled="True" TouchScaleEnabled="True"
                               MinimumScale="200" MaximumScale="1000" XLocation="300" YLocation="300"/>
                </interactivity:Interaction.Behaviors>
            </Image>
        </Canvas>
    </Grid>
</UserControl>
